﻿<?php
import('Cache.~');
/**
 * IndexController
 *
 * @package
 * @author darche
 * @copyright Copyright (c) 2009
 * @version $Id$
 * @access public
 */
class PlanningController extends Hoa_Controller_Action_Standard {

	/**
	 * IndexController::IndexAction()
	 *
	 * @return
	 */
	public function IndexAction(){
		$this->head->addCssFile($this->config->rep->cssFileForJs.'/agenda.class.css');

		# Gestion du cache
		$frontendOptions = array(
			'lifetime' => 600
		);
		$backendOptions = array(
			'cache_directory' => $this->config->rep->cacheDirectory.'/'
		);
		$cache = Hoa_Cache::factory('Class', 'File', $frontendOptions, $backendOptions);
		$cache->setObject('PlanningModel');
		$this->view->agenda = $cache->showPlanning();

		$this->view->config = $this->config;
		$this->view->titre = 'Planning';
		$this->view->config = $this->config;
		$this->view->head 	= $this->head;
		echo $this->view->render();
	}

}